const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  pages: {
    index: {
      entry: 'src/main.js',
      template: 'public/index.html',
      title: 'HelloWorld',
    },
  },
  outputDir:'../main/resources/public/',
  filenameHashing: true,
  productionSourceMap: false,
  parallel: require('os').cpus().length > 1,
  devServer: {
    open: false,
    host: '0.0.0.0',
    port: 3001,
    disableHostCheck: true,
    https: false,
    hotOnly: true,
    proxy: null,
    headers: {
      'Access-Control-Allow-Origin': '*',
    },
  },
  configureWebpack: {
    resolve: {
      symlinks: false,
      alias: {
        '@': resolve('src'),
        vue$: path.resolve(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js'),
      },
    },
    plugins: [ ],
    performance: {
      hints: false,
    },
  },
}
